<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/template" prefix="t" %>
<%@ taglib tagdir="/WEB-INF/tags/componentes" prefix="comp" %>

<t:template>
	<jsp:body>
		<div class="contact_form">
				<div class="form_subtitle">Usuario</div>
				
				<comp:messages />
					
				<table class="table" style="width:100%;">
					<thead>
						<tr>
							<th class="title">Código</th>
							<th class="title">Usuário</th>
							<th class="title"></th>
							<th class="title"></th>
						</tr>
					</thead>
				<tbody>
					<c:forEach var="item" items="${listaUsuarios}">
						<tr>
							<td>${item.pkCodigo}</td>
							<td>${item.dsUsuario}</td>
							<td><a href="${pageContext.request.contextPath}/usuario/update?usuario.pkCodigo=${item.pkCodigo}" class="button">Alterar</a></td> 
							<td><a href="${pageContext.request.contextPath}/usuario/delete?usuario.pkCodigo=${item.pkCodigo}" class="button">Excluir</a></td>
						</tr>
					</c:forEach>
				</tbody>
				</table><br/>				
				
			<div class="form_row">					
				<button onclick="javascript:window.location = '${pageContext.request.contextPath}/usuario/incluir'" class="button">Incluir</button>
			</div>
		</div>
	</jsp:body>
</t:template>